package com.item.service.item;
;
import com.item.mapper.springsecuritymapper;
import com.item.pojo.Auth;
import com.item.pojo.Role;
import com.item.pojo.User;
import com.item.service.roleservice;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
@AllArgsConstructor
public class roleservicerimpl  implements roleservice {


    private springsecuritymapper springsecuritymapper;

    @Override
    public List<Role> findrolebyusername(String username) {
        List<Role> roles= springsecuritymapper.findByUsername(username);
        return roles;
    }

    @Override
    public User getuser(String username) {
      User user=  springsecuritymapper.getusername(username);

        return user;
    }

    @Override
    public List<Auth> findauthbyusername(String username) {
        List<Auth> auth= springsecuritymapper.findAuthByUsername(username);
        return auth;
    }


}
